<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>设置</title>
        <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="stylesheet" href="../../css/mui.min.css">
        <style>
            html,body {
                background-color: #efeff4;
            }
            .mui-title,header .mui-icon{
                color: #8cb33e;
            }
            .mui-icon:active{
                color: #8cb33e;
            }
            .title{
                margin: 20px 15px 10px;
                color: #6d6d72;
                font-size: 15px;
            }
            .mui-table-view-cell a{
                color: inherit;
                font-size: 14px;
            }
        </style>
    </head>
    <body>
        <header class="mui-bar mui-bar-nav">
            <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
            <h1 class="mui-title">设置</h1>
        </header>
        <div class="mui-content">
            <ul class="mui-table-view">
                <li class="mui-table-view-cell">
                    <a class="mui-navigate-right">
                        新消息通知
                    </a>
                </li>
                <li class="mui-table-view-cell">
                    <a class="mui-navigate-right">
                        隐私
                    </a>
                </li>
                <li class="mui-table-view-cell">
                    <a class="mui-navigate-right">
                        通用
                    </a>
                </li>
            </ul>
            <ul class="mui-table-view" style="margin-top: 25px;">
                <li class="mui-table-view-cell">
                    <a class="mui-navigate-right">
                        当前版本
                        <span style="float: right;color: #bbb;margin-right: 20px;">v&nbsp;2.0</span>
                    </a>
                </li>
                <li class="mui-table-view-cell">
                    <a id="about" class="mui-navigate-right">
                        关于楚天名医
                    </a>
                </li>
            </ul>
            <ul class="mui-table-view" style="margin-top: 25px;">
                <li id="outLog" class="mui-table-view-cell">
                    <a style="text-align: center;color: #FF3B30;">
                        退出登录
                    </a>
                </li>
            </ul>
        </div>
    </body>
    <script src="../../js/mui.min.js"></script>
    <script>
        var doc = document;
        mui.init({
            swipeBack:true //启用右滑关闭功能
        });
        mui.plusReady(function () {
            doc.getElementById('outLog').addEventListener('tap', function () {
                plus.nativeUI.confirm("确定退出登录？", function(e) {
                    if (e.index == 0) {
                        logoutClear();
                    }
                }, "", ["退出", "算了"]);
            });
        });

        function logoutClear() {
            plus.storage.removeItem('userInfo');
            mui.openWindow({
                url: "../login/login.html",
                id: "login",
                waiting: {
                    autoShow: false // 取消显示等待框
                }
            });
        }

        doc.getElementById("about").addEventListener('tap',function () {
            //获得主页面的webview
            var main = plus.webview.currentWebview().parent();
            //触发主页面的gohome事件
            mui.fire(main,'gohome');
        });
    </script>
</html>